  <table>
  <foreach name="address_list" key="k" item="addr">
  <if condition="$k eq 0">
                            <tr class="on"  id="address_item_{$addr.id}"  onclick="sel_address({$addr.id})" >
                                <td class="jc1">
                                    <a >{$addr.realname}</a>
                                </td>
                                <td class="jc2">
                                    {$addr.phone}
                                </td>
                                <td class="js3">
                                   {$addr.province} {$addr.city} {$addr.area} {$addr.address}
                                   <if condition="$addr['is_default'] eq 1"><i class="moren">默认地址</i></if>
                                </td>
                                <td class="js4">
                                  <a class="m2"  href="javascript:void(0)" onclick="edit_address({$addr.id})">编辑</a>
                                    <a class="m3" href="javascript:void(0)" onclick="del_address({$addr.id},this)">x</a>
                                </td>
                            </tr>
            <else/> 
                            
                            <tr id="address_item_{$addr.id}" onclick="sel_address({$addr.id})" >
                                <td class="jc1">
                                    <a onclick="sel_address({$addr.id})">{$addr.realname}</a>
                                </td>
                                <td class="jc2">
                                    {$addr.phone}
                                </td>
                                <td class="js3">
                                   {$addr.province} {$addr.city} {$addr.area} {$addr.address}
                                </td>
                                <td class="js4">
                                    
                                    <a class="m2"  href="javascript:void(0)" onclick="edit_address({$addr.id})">编辑</a>
                                    <a class="m3" href="javascript:void(0)" onclick="del_address({$addr.id},this)">x</a>
                                </td>
                            </tr>
            </if>
            </foreach>
       
                        </table>


<script type="text/javascript">
        $('.jssum tr').hover(function () {
            $(this).children('td').addClass('bg');
        }, function () {
            $(this).children('td').removeClass('bg');
        })
</script>
